'''
请写出一段 Python 代码实现分组一个 list 里面的元素
比如 [1,2,3,...100] 变成 [[1,2,3],[4,5,6]....[100]]
'''
def group_list(lst, group_size):
    return [lst[i:i+group_size] for i in range(0, len(lst), group_size)]

if __name__ == '__main__':
    lst = [1,2,3,4,5,6,7,8,9,10]
    group_size = 3
    print(group_list(lst, group_size))